package com.m3839.sdk.ym.widget

import android.graphics.Color
import android.text.TextPaint
import android.text.style.ClickableSpan
import android.view.View

/**
 * @description: PSClickableSpan
 *
 * @author ChenBaoyang
 * @date 6/16/21 16:46
 */
class PSClickableSpan(private val mListener: View.OnClickListener) : ClickableSpan() {

    override fun onClick(widget: View) {
        mListener.onClick(widget)
    }

    override fun updateDrawState(ds: TextPaint) {
        super.updateDrawState(ds)
        ds.isUnderlineText = false
        ds.color = Color.parseColor("#23c268")
    }
}